package utils

import (
	"os"
	"os/exec"
)

// windows下cmd运行根目录下batfile的函数可以带一个参数arg
func BatRun(batfile string, arg string) error {
	dir, _ := os.Getwd()
	cmd := exec.Command("cmd.exe", "/C", dir+`\`+batfile, arg)
	return cmd.Run()
}
